﻿using System;
using System.Web.Security;

namespace FacialClub.Models.Interfaces
{
    /// <summary>
    /// Account Repository Interface
    /// </summary>
    public interface IAccountRepository
    {
        /// <summary>
        /// Minimum Password Length
        /// </summary>
        int MinPasswordLength { get; }

        /// <summary>
        /// SignIn Prototype Declaration
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="createPersistentCookie"></param>
        void SignIn(string userName, bool createPersistentCookie);

        /// <summary>
        /// SignOut Prototype Declaration
        /// </summary>
        void SignOut();

        /// <summary>
        /// Validate User
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        bool ValidateUser(string userName, string password);

        /// <summary>
        /// Get Canonical Username
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        string GetCanonicalUsername(string userName);

        /// <summary>
        /// Create User
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <param name="email"></param>
        /// <returns></returns>
        MembershipCreateStatus CreateUser(string userName, string password, string email);

        /// <summary>
        /// Register Customer
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="firstName"></param>
        /// <param name="lastName"></param>
        /// <param name="birthDate"></param>
        /// <param name="address"></param>
        /// <param name="city"></param>
        /// <param name="state"></param>
        /// <param name="postalCode"></param>
        /// <param name="country"></param>
        /// <param name="telephone"></param>
        /// <param name="telephoneExtension"></param>
        /// <param name="fax"></param>
        /// <param name="faxExtension"></param>
        /// <param name="email"></param>
        /// <param name="url"></param>
        /// <param name="isActive"></param>
        /// <param name="userCreated"></param>
        /// <param name="createdDate"></param>
        void RegisterUser(Guid userId , string firstName ,string lastName ,DateTime birthDate ,string address ,string city ,string state ,string postalCode ,
                          string country ,string telephone ,string telephoneExtension ,string fax ,string faxExtension ,string email ,string url ,bool 
                          isActive , string userCreated ,DateTime createdDate );

        /// <summary>
        /// Change Password
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="oldPassword"></param>
        /// <param name="newPassword"></param>
        /// <returns></returns>
        bool ChangePassword(string userName, string oldPassword, string newPassword);

        /// <summary>
        /// Get UserId By Email
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        Guid GetUserIdByEmail(string email);
    }
}